package com.example.petstoreservice.mapper;

import com.example.petstoreservice.entity.Product;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ProductMapper {
    List<Product> getAll();

    int insertGood(Product product);

    int updateGood(Product product);

    int delete(Long id);

    List<Product> search(@Param("keyword") String keyword);

    Product getById(Long id);
    Product getByIdWithout(Long id);
    List<Product> getByShopId(Long supplierId);
    List<Product> getCat();
    List<Product> getDog();
    List<Product> findTop3Good(Long supplierId);
    int incrementClick(Long id);
    List<Product> getAllSortedByClick();
}
